HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/dashboard.orbiwheels.com/app/Http/Controllers/Admin/RideController.php
<?php

namespace App\Http\Controllers\Admin;

use App\DataTables\Admin\RideDataTable;
use App\Http\Controllers\Controller;
use App\Models\BookingRide;
use App\Models\Driver;
use App\Models\Vehicle;
use Illuminate\Http\Request;

class RideController extends Controller
{
    public function index(RideDataTable $dataTable)
    {
        $drivers = Driver::where('status', 'active')->get();
        $vehicles = Vehicle::where('status', 'active')->get();

        return $dataTable->render('admin.rides.index', compact('drivers', 'vehicles'));
    }
    public function view($id)
    {
        $drivers = Driver::where('status', 'active')->get();
        $vehicles = Vehicle::where('status', 'active')->get();

        $ride = BookingRide::with('booking')->findOrFail(decrypt($id));
        return view('admin.rides.view', compact(['ride','drivers','vehicles']));
    }
}